import { defineStore } from 'pinia'
 
export const loginStore = defineStore('login', {
  state: () => {
    return {
      user:{},
      token:""
    }
  },
 
  getters: {
	  getToken(state){
      return state.token;
    }
  },
  actions: {
   SETTOKEN(data:any){
    this.token=data;
   }
  },
  persist:[
     {
      pick:["token"],
      key:"user-login",
      storage: piniaPluginPersistedstate.localStorage(),
    }
  ],
})
